package com.demo.project_template.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

/**
 * <p>
 * 商品类目表，类目和商品(spu)是一对多关系，类目与品牌是多对多关系
 * </p>
 *
 * @author 杨玉龙
 * @since 2023-06-19 15:56:44
 */
@Getter
@Setter
@TableName("t_product_category")
@ApiModel(value = "ProductCategory对象", description = "商品类目表，类目和商品(spu)是一对多关系，类目与品牌是多对多关系")
public class ProductCategory implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("分类Id")
      @TableId(value = "category_id", type = IdType.AUTO)
    private Integer categoryId;

    @ApiModelProperty("分类名称")
    @TableField("category_name")
    private String categoryName;

    @ApiModelProperty("图标路径")
    @TableField("image_url")
    private String imageUrl;

    @ApiModelProperty("排序指数，越小越靠前")
    @TableField("sort")
    private Integer sort;

    @ApiModelProperty("是否删除(0=否，1=是)")
    @TableField("is_delete")
    @TableLogic
    private String isDelete;

    @ApiModelProperty("数据创建时间")
      @TableField(value = "create_time", fill = FieldFill.INSERT)
    private Date createTime;

    @ApiModelProperty("数据更新时间")
      @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;


}
